﻿{% extends "gma/base.html" %}
{% load static %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-landmark weui_grid_icon_fa" style="font-size: 32px"> </i> 公会管理
    </h1>
    <p class="page__desc">公会管理可查看公会成员的日/周/月收益，已经增加和删除公会成员。</p>
</div>

<div class="page__bd">
    <div class="weui-cells__title"> 公会列表 </div>
    <div class="weui-cells">
        <a class="weui-cell weui-cell_access" href="{% url 'gma:guild_list' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-landmark gm_menu_item_icon"></i> 公会列表</p> </div>
            <div class="weui-cell__ft"> {{ total_guild_count }} </div>
        </a>
    </div>

    <div class="weui-cells__title"> 快捷入口 </div>
    <div class="weui-cells">
        <a class="weui-cell weui-cell_access copy-btn" data-clipboard-text="https://m.yyzb.com/guild/">
            <div class="weui-cell__bd"> <p> <i class="fa fa-copy gm_menu_item_icon"></i> 复制公会管理后台地址【对外】 </p> </div>
            <div class="weui-cell__ft"> <span style="cursor: pointer" onclick="" class="btn" id="foo" data-clipboard-target="#foo" data-clipboard-action="copy" ></span> </div>
        </a>
    </div>
</div>

<div class="weui-btn-area">
    <a class="weui-btn weui-btn_block weui-btn_primary" href="{% url 'gma:create_guild' %}"> <i class="fa fa-plus-square"></i> 创建公会 </a>
</div>

<div class="page__ft j_bottom">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
<script src="{% static 'js/clipboard.min.js' %}"></script>

<script>
var clipboard = new ClipboardJS('.copy-btn');

clipboard.on('success', function(e) {
    show_toast("已复制到粘贴板");
    e.clearSelection();
});

clipboard.on('error', function(e) {
    show_toast(e.action);
});
</script>
{% endblock extra_js %}